demo = {}
-- table to store available examples
demo.examples = {}
demo.examples[1] = {registered = {}}
demo.centerarea = {5, 40, 540, 555}

function love.load()	
	--tween = require("libraries.third-party.tween")
	loveframes = require("libraries.loveframes")
	require("examples.frame")
	--直接弹出公寓
    for k, v in ipairs(demo.examples) do
		for key, value in ipairs(v.registered) do
				value.func()--直接弹出公寓
				value.func()
		end
	end
	
end


function love.update(dt)
	loveframes.update(dt)	
end

function love.draw()	
	love.graphics.setColor(1, 1, 1, 1)
	loveframes.draw()	
end

function love.mousepressed(x, y, button)	
	loveframes.mousepressed(x, y, button)
end

function love.mousereleased(x, y, button)
	loveframes.mousereleased(x, y, button)
end



function love.keyreleased(key)
	loveframes.keyreleased(key)
end

function love.textinput(text)
	loveframes.textinput(text)
end
--注册
function demo.RegisterExample(example)	
	local examples = demo.examples
	for k, v in ipairs(examples) do
			table.insert(examples[k].registered, example)
	end
end